/*
* Copyright 2016 YONYOU Corporation Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project         marketing

* @Package         com.yonyou.marketing.message.push.entrance

* @Author          LuZhen

* @FileName        Receiver

* @Date            16/11/9

----------------------------------------------------------------------------------
*     Date          Who             Version         Comments
* 1. 16/11/9        LuZhen          1.0             Create Source
*
----------------------------------------------------------------------------------
*/
package org.marketing.common.entity.wechatpushmessage;


import org.marketing.common.constants.MessagePushConstant;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 消息接收人
 */
public class WeChatMessageProtocolReceiver {


    public MessagePushConstant.PUSH_PLATFORM getPlatform() {
        return platform;
    }

    public void setPlatform(MessagePushConstant.PUSH_PLATFORM platform) {
        this.platform = platform;
    }


    /**
     * 消息接收设备平台
     */
    @NotNull
    private MessagePushConstant.PUSH_PLATFORM platform;

    /**
     * 离散类接收人清单
     * 3类接收人必须有一个 并且与类型匹配
     */
    private List<String> detailList= new ArrayList<>();

    /**
     * 标签类接收人清单
     * 3类接收人必须有一个 并且与类型匹配
     */
    private List<String> tagList = new ArrayList<>();

    /**
     * 别名类接收人清单
     * 3类接收人必须有一个 并且与类型匹配
     */
    private List<String> aliasList = new ArrayList<>();

    /**
     * 是否全部推送
     * 3类推送中有且只有指定一类
     */
    private boolean isAll;
    /**
     * 是否分组推送
     * 3类推送中有且只有指定一类
     * 必须指定标签类接收人清单或别名类接收人清单中的一个或者多个
     */
    private boolean isGroup;
    /**
     * 是否指定推送
     * 3类推送中有且只有指定一类
     * 必须指定离散类推送人
     */
    private boolean isDetail;

    public boolean isGroup() {
        return isGroup;
    }

    public void setGroup(boolean group) {
        isGroup = group;
    }

    public boolean isDetail() {
        return isDetail;
    }

    public void setDetail(boolean detail) {
        isDetail = detail;
    }

    public List<String> getDetailList() {
        return detailList;
    }

    public void addDetailList(String detailList) {
        this.detailList.add(detailList);
    }

    public void addDetailList(List<String> detailList) {
        this.detailList.addAll(detailList);
    }

    public List<String> getTagList() {
        return tagList;
    }

    public void setTagList(List<String> tagList) {
        this.tagList = tagList;
    }

    public List<String> getAliasList() {
        return aliasList;
    }

    public void setAliasList(List<String> aliasList) {
        this.aliasList = aliasList;
    }

    public boolean isAll() {
        return isAll;
    }

    public void setAll(boolean all) {
        isAll = all;
    }
}
